package com.mathdroid.gui.main.abilities.optimizer;

import com.mathdroid.gui.componentlist.AComponentListElement;
import com.mathdroid.model.abilities.optimizer.AbilityOptimizerResult;

/**
 * This encapsulates information about a ability optimizer result.
 */
public final class ResultElement extends AComponentListElement {

	/**
	 * Ability optimizer result.
	 */
	private AbilityOptimizerResult result = null;
	
	/**
	 * The highest rating of all results.
	 */
	private double maxRating = 0;
	
	/**
	 * Create an element for the ResultListModel that encapsulates an
	 * AbilityOptimizerResult.
	 * @param r AbilityOptimizerResult.
	 * @param max The highest rating of all results.
	 */
	public ResultElement(final AbilityOptimizerResult r, final double max) {
		this.result = r;
		this.maxRating = max;
	}
	
	/**
	 * @return The AbilityOptimizerResult.
	 */
	public AbilityOptimizerResult getResult() {
		return this.result;
	}
	
	/**
	 * @return The highest rating of all results.
	 */
	public double getMaxRating() {
		return this.maxRating;
	}
}
